<h3 class="info-tag">
    <a href="javascript:history.go(-1);void(0);" class="r uiBtn">返回</a>
    {if !empty($spec.id)}
    编辑规格 - {$spec.name}
    {else}
    添加规格
    {/if}<span></span>
</h3>
{literal}<style type="text/css">
#xlist_tpl{ display:none;}
</style>{/literal}
<div class="html-box">
    <!--添加新闻-->
    <form class="newsBox" target="createNewsBox" enctype="multipart/form-data" method="post" action="/manage/goods/submit" style="padding:5px 5px 80px">

        <input id="specId" name="specId" type="hidden" value="{$spec.id}" />

        <div class="f-unit">
            <label class="ui-label w60">规格名称：</label>
            <input class="form-i w360" id="specName" type="text" name="name" value="{$spec.name}" />
        </div>

        <div class="f-unit">
            <label class="ui-label w60">规格设置：</label>
            <div class="spec-item l" style="width:367px">
                <table style="width:100%" class="list">
                    <tbody id="specTable">
                    <tr>
                        <th>规格值</th>
                        <th>排序</th>
                        <th>操作</th>
                    </tr>
                    {if count($spec.values)}
                    {foreach from=$spec.values item=m key=k}
                    <tr>
                        <td><input name="olds[name][{$m.id}]" class="form-i LH22 w140" value="{$m.value}" /></td>
                        <td><input name="olds[order][{$m.id}]" class="form-i LH22 w40" value="{$m.order}" /></td>
                        <td><a href="javascript:;" class="uiBtn BtnOrange e2-goods-rmSpecItem-{$m.id}"><i class="iconfont">&#xe60b;</i></a></td>
                    </tr>
                    {/foreach}
                    {else}
                    <tr>
                        <td><input name="item[name][0]" class="form-i LH22 w140" /></td>
                        <td><input name="item[order][0]" class="form-i LH22 w40" value="0" /></td>
                        <td>-</td>
                    </tr>

                    {/if}
                    </tbody>
                </table>
                <div style="padding-top:5px">
                    <a href="javascript:;" class="uiBtn BtnBlue e2-goods-addspec">添加规格</a>
                </div>


            </div>

        </div>


        <div class="f-unit">
            <label class="ui-label w60">&nbsp;</label>
            <a type="submit" class="uiBtn BtnGreen BtnLg e2-goods-submitSpec">提&nbsp;&nbsp;交</a>
        </div>
    </form>

    <iframe name="createNewsBox" style="border:1px solid #ccc; height:300px; width:660px; display:none"></iframe>

</div>
{literal}
<script type="text/javascript">

    $.loadJs('/js/manage/goods.js',function(){
    });

</script>{/literal}
</div>